/**
 * Copyright (C), 2016-2019
 * FileName: App2
 * Author:   yacnog_liu
 * Date:     2019/4/4 23:38
 * Description:
 */
package com.mayi.bootdemo;

import com.mayi.bootdemo.servlet.SecondServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class App2 {

    public static void main(String[] args) {
        SpringApplication.run(App2.class, args);
    }

    @Bean
    public ServletRegistrationBean getSecondServletBean() {
        ServletRegistrationBean bean = new ServletRegistrationBean(new SecondServlet(), "/second");
        return bean;
    }
}
